<?php

namespace  app\subscribe;

use ltcms\lib\Event;

class Test
{
    protected $eventPrefix = 'User';

    /**
     * 测试
     * @param null $params
     */
    public function onAppInit($params=null)
    {
        echo "订阅-测试".$params;
    }

    /**
     * 订阅事件
     * @param Event $event
     */
    public function subscribe(Event $event)
    {
        $event->listen('AppInit', [$this,'onAppInit']);
    }
}